<?php

namespace common\models\tmall1;

use Yii;

/**
 * This is the model class for table "tmall1.order_goods".
 *
 * @property integer $uid
 * @property integer $order_id
 * @property integer $goods_id
 * @property integer $product_id
 * @property integer $member_uid
 * @property string $goods_name
 * @property string $spec_desc
 * @property integer $buy_number
 * @property double $sale_price
 * @property double $buy_price
 * @property double $buy_second_price
 * @property integer $addtime
 * @property integer $is_paypost
 * @property integer $is_gift
 * @property integer $is_jiajiagou
 * @property integer $gift_id
 * @property integer $is_pickout
 * @property integer $pickout_id
 * @property integer $category_id
 * @property integer $goods_point
 * @property integer $order_goods_id
 * @property integer $comment_id
 * @property integer $free_order_id
 * @property string $cost_price
 * @property integer $is_givegoods
 * @property integer $givegoods_id
 * @property integer $is_comment
 * @property integer $isnewyear
 * @property integer $act_type
 * @property integer $act_id
 * @property integer $act_cart_id
 * @property integer $price_type
 * @property integer $jfs
 * @property double $exchange_price
 * @property integer $box_goods_id
 * @property integer $wap_goods_id
 * @property integer $wap_product_id
 */
class OrderGoods extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'tmall1.order_goods';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['order_id', 'goods_id', 'product_id', 'member_uid', 'buy_number', 'addtime', 'is_paypost', 'is_gift', 'is_jiajiagou', 'gift_id', 'is_pickout', 'pickout_id', 'category_id', 'goods_point', 'order_goods_id', 'comment_id', 'free_order_id', 'is_givegoods', 'givegoods_id', 'is_comment', 'isnewyear', 'act_type', 'act_id', 'act_cart_id', 'price_type', 'jfs', 'box_goods_id', 'wap_goods_id', 'wap_product_id'], 'integer'],
            [['sale_price', 'buy_price', 'buy_second_price', 'cost_price', 'exchange_price'], 'number'],
            [['goods_name', 'spec_desc'], 'string', 'max' => 120],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'uid' => 'Uid',
            'order_id' => '订单id',
            'goods_id' => '商品id',
            'product_id' => '货品id',
            'member_uid' => '会员id',
            'goods_name' => '商品名',
            'spec_desc' => '规格描述文字',
            'buy_number' => '购买数量',
            'sale_price' => '市场价',
            'buy_price' => '实际购买的价格',
            'buy_second_price' => '第二件购买价格',
            'addtime' => '添加时间',
            'is_paypost' => '是否付邮产品 1是 0不是',
            'is_gift' => '是否满额赠 1是 0不是',
            'is_jiajiagou' => '是否加价购 1是 0不是',
            'gift_id' => '满额赠、加价购活动ID',
            'is_pickout' => '是否超值选购 1是 0不是',
            'pickout_id' => '超值选购活动ID',
            'category_id' => '产品分类ID',
            'goods_point' => '单件商品赠送的积分值',
            'order_goods_id' => 'Order Goods ID',
            'comment_id' => '评论id',
            'free_order_id' => 'Free Order ID',
            'cost_price' => 'Cost Price',
            'is_givegoods' => 'Is Givegoods',
            'givegoods_id' => 'Givegoods ID',
            'is_comment' => '0允许评价1不允许评价',
            'isnewyear' => 'Isnewyear',
            'act_type' => 'Act Type',
            'act_id' => 'Act ID',
            'act_cart_id' => 'Act Cart ID',
            'price_type' => 'Price Type',
            'jfs' => 'Jfs',
            'exchange_price' => 'Exchange Price',
            'box_goods_id' => 'Box Goods ID',
            'wap_goods_id' => 'wap商品id',
            'wap_product_id' => 'wap货品id',
        ];
    }
}
